import java.util.List;

public class Main {
    public static void main(String[] args) {
        MyTree myTree = new MyTree();
        MyTree.TreeNode root = myTree.createTree();
        List<Character> ret = myTree.preOrder(root);
        System.out.println(myTree.isBalanced(root));
    }
}